<script setup>
// pinia操作
import { useApiStore,useCounterStore } from '@/stores'

const apiStore = useApiStore();
const counterStore = useCounterStore();

</script>

<template>
    <div>
      <h1>pinia使用页</h1>
        <div style="margin-top: 50px ;">
          <p>{{ apiStore.access_token }}</p>
          <p>{{ apiStore.api_key }}</p>
          <el-button @click="apiStore.setAcccessToken('access_tokensssssss')" type="success">添加</el-button>
          <el-button @click="apiStore.setApikey('apikey')" type="success">添加api</el-button>
          <el-button @click="apiStore.removeAcccessToken()"   type="error">清空access_token</el-button>
          <el-button @click="apiStore.removeApikey()"  type="error">清空api</el-button>
      </div>

    <div style="margin-top: 50px ;">
        {{ counterStore.count }}
        <el-button  @click="counterStore.addCount(10)">加10</el-button>
    </div>


    </div>
</template>
  
  <style>
  </style>
  